﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Nop.Core;
using Nop.Core.Domain.Customers;
using Nop.Web.Framework.Controllers;

namespace Nop.Admin.Controllers
{
    [AdminAuthorize]
    public class SharedController : Controller
    {
        private readonly IWorkContext _workContext;

        public SharedController(IWorkContext workContext)
        {
            _workContext = workContext;
        }

        public ActionResult Menu()
        {
            if (_workContext.CurrentCustomer.IsShopOwner())
            {
                return PartialView("ShopOwnerMenu");
            }
            else
            {
                return PartialView("Menu");
            }
        }

    }
}
